﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Data.Linq;

namespace ArbolandiaBL
{
    [DataContract]
    public class UIProductResume
    {
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string ShortDescription { get; set; }
        [DataMember]
        public Decimal LowerPrice { get; set; }
        [DataMember]
        public string Size { get; set; }
        [DataMember]
        public string ImageUrl { get; set; }
        [DataMember]
        public List<UIProductPreference> ProductPreferences { get; set; }
    }

    [DataContract]
    public class UIProductVariousResume
    {
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string ShortDescription { get; set; }
        [DataMember]
        public Decimal LowerPrice { get; set; }
        [DataMember]
        public string ImageUrl { get; set; }
        [DataMember]
        public int? ProductDetailId { get; set; }
    }

    public static class NewUICategoryResume
    {
        public static UICategoryResume newCategoryResume
        {
            get
            {
                var res = new UICategoryResume();
                res.ImageUrl = string.Empty;
                res.MetaDescription = string.Empty;
                res.Name = string.Empty;
                res.Subcategory = new List<UISubcategoryResume>();
                return res;
            }
        }
    }
    [DataContract]
    public partial class UICategoryResume
    {
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string MetaDescription { get; set; }
        [DataMember]
        public string ImageUrl { get; set; }
    }

    public partial class UICategoryResume
    {
        [DataMember]
        public List<UISubcategoryResume> Subcategory { get; set; }
    }

    [DataContract]
    public class UISubcategoryResume
    {
        [DataMember]
        public int IdCategory { get; set; }
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public int? TotalProducts { get; set; }
        [DataMember]
        public decimal? LowerPrice { get; set; }
        [DataMember]
        public string ImageUrl { get; set; }
    }

    [DataContract]
    public class UISubcategoryDetail
    {
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string MetaDescription { get; set; }
        [DataMember]
        public string UrlVideo { get; set; }
        [DataMember]
        public int IdCategory { get; set; }
        [DataMember]
        public string CategoryName { get; set; }
        [DataMember]
        public string ImageUrl { get; set; }
    }

    public static class NewUISubcategoryDetail
    {
        public static UISubcategoryDetail newSubcategoryDetail
        {
            get
            {
                var res = new UISubcategoryDetail();
                res.ImageUrl = string.Empty;
                res.MetaDescription = string.Empty;
                res.Name = string.Empty;
                res.CategoryName = string.Empty;
                res.UrlVideo = string.Empty;
                return res;
            }
        }
    }

    [DataContract]
    public class UIImageProduct
    {
        [DataMember]
        public string GuidId { get; set; }
        [DataMember]
        public string ImageUrl { get; set; }
        [DataMember]
        public string ToolTip { get; set; }
        [DataMember]
        public string LinkUrl { get; set; }
        [DataMember]
        public Int32 iOrder { get; set; }
    }

    [DataContract]
    public class UIProductDetail
    {
        private List<UIImageProduct> _thumbnailsImages;
        private List<UIImageProduct> _fullSizeImages;
        private List<UIProductResume> _complements;
        private List<UIProductPriceDetail> _productPriceDetails;
        private List<UIProductPreference> _preferences;

        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string ScientistName { get; set; }
        [DataMember]
        public string ShortDescription { get; set; }
        [DataMember]
        public string LongDescription { get; set; }
        [DataMember]
        public string Size { get; set; }
        [DataMember]
        public string MesesFloracion { get; set; }
        [DataMember]
        public string MesesFrutos { get; set; }
        [DataMember]
        public string DiscountPrice { get; set; }
        [DataMember]
        public bool IsOferta { get; set; }
        [DataMember]
        public bool IsDestacado { get; set; }
        [DataMember]
        public bool ShowAtHome { get; set; }
        [DataMember]
        public string Plantacion { get; set; }
        [DataMember]
        public string Mantenimiento { get; set; }
        [DataMember]
        public string Detalles { get; set; }
        [DataMember]
        public List<UIImageProduct> ThumbnailsImages
        {
            get
            {
                if (_thumbnailsImages == null) { _thumbnailsImages = new List<UIImageProduct>(); }
                return _thumbnailsImages;
            }
            set { }
        }
        [DataMember]
        public List<UIImageProduct> FullSizeImages
        {
            get
            {
                if (_fullSizeImages == null) { _fullSizeImages = new List<UIImageProduct>(); }
                return _fullSizeImages;
            }
            set { }
        }
        [DataMember]
        public List<UIProductResume> Complements
        {
            get
            {
                if (_complements == null) { _complements = new List<UIProductResume>(); }
                return _complements;
            }
            set { }
        }
        [DataMember]
        public List<UIProductPriceDetail> ProductPriceDetails
        {
            get
            {
                if (_productPriceDetails == null) { _productPriceDetails = new List<UIProductPriceDetail>(); }
                return _productPriceDetails;
            }
            set { }
        }
        [DataMember]
        public List<UIProductPreference> Preferences
        {
            get
            {
                if (_preferences == null) { _preferences = new List<UIProductPreference>(); }
                return _preferences;
            }
            set { }
        }
        [DataMember]
        public Int32 SubCategoryId { get; set; }
    }

    [DataContract]
    public class UIProductVariousDetail
    {
        private List<UIImageProduct> _thumbnailsImages;
        private List<UIImageProduct> _fullSizeImages;
        private List<UIProductResume> _complements;
        private List<UIProductPriceDetail> _productPriceDetails;

        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string ShortDescription { get; set; }
        [DataMember]
        public string LongDescription { get; set; }
        [DataMember]
        public string DiscountPrice { get; set; }
        [DataMember]
        public bool IsOferta { get; set; }
        [DataMember]
        public bool IsDestacado { get; set; }
        [DataMember]
        public bool ShowAtHome { get; set; }
        [DataMember]
        public string Detalles { get; set; }
        [DataMember]
        public List<UIImageProduct> ThumbnailsImages
        {
            get
            {
                if (_thumbnailsImages == null) { _thumbnailsImages = new List<UIImageProduct>(); }
                return _thumbnailsImages;
            }
            set { }
        }
        [DataMember]
        public List<UIImageProduct> FullSizeImages
        {
            get
            {
                if (_fullSizeImages == null) { _fullSizeImages = new List<UIImageProduct>(); }
                return _fullSizeImages;
            }
            set { }
        }
        [DataMember]
        public List<UIProductResume> Complements
        {
            get
            {
                if (_complements == null) { _complements = new List<UIProductResume>(); }
                return _complements;
            }
            set { }
        }
        [DataMember]
        public List<UIProductPriceDetail> ProductPriceDetails
        {
            get
            {
                if (_productPriceDetails == null) { _productPriceDetails = new List<UIProductPriceDetail>(); }
                return _productPriceDetails;
            }
            set { }
        }
        [DataMember]
        public Int32 SubCategoryId { get; set; }
    }

    [DataContract]
    public partial class UIProductPriceDetail
    {
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string GuidId { get; set; }
        [DataMember]
        public decimal Price { get; set; }
        [DataMember]
        public decimal DiscountPrice { get; set; }
        [DataMember]
        public string ProductCode { get; set; }
        [DataMember]
        public string Description { get; set; }
        [DataMember]
        public int Stock { get; set; }
        [DataMember]
        public bool IsAcompanamiento { get; set; }
    }

    public partial class UIProductPriceDetail
    {
        [DataMember]
        public string ImageUrlThumnail { get; set; }
    }

    [DataContract]
    public class UIProductPreference
    {
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public string Description { get; set; }
        [DataMember]
        public short Order { get; set; }
        [DataMember]
        public string ImageUrl { get; set; }

    }

    [DataContract]
    public class UIProductsHome
    {
        [DataMember]
        public int Id { get; set; }
        [DataMember]
        public string Name { get; set; }
        [DataMember]
        public decimal LowerPrice { get; set; }
        [DataMember]
        public string ImageUrl { get; set; }
        [DataMember]
        public string DiscountDescription { get; set; }
        [DataMember]
        public bool IsOferta { get; set; }
        [DataMember]
        public bool IsDestacado { get; set; }
    }

}
